import 'package:dio/dio.dart';

import 'api_url.dart';
import 'dio_util.dart';

class Api {
  Api._();

  /// 验证手机号
  static Future checkPhoneNumber(Map<String, dynamic>? params) {
    return DioUtil.instance.request(ApiUrl.checkPhoneNumber, method: DioMethod.post, data: params);
  }
  //发送验证码
  static Future sendCaptcha(Map<String, dynamic>? params) {
    return DioUtil.instance.request(ApiUrl.sendCaptcha, method: DioMethod.post, data: params);
  }
  //登录
  static Future loginByCaptcha(Map<String, dynamic>? params) {
    return DioUtil.instance.request(ApiUrl.loginByCaptcha, method: DioMethod.post, data: params);
  }

  //获取首页的headImage
  static Future getListImageForApp(Map<String, dynamic>? params) {
    return DioUtil.instance.request(ApiUrl.getListImageForApp, method: DioMethod.post, data: params);
  }


  ///  getUserInfo
  static Future getUserInfo() {
    return DioUtil.instance.request(ApiUrl.getUserInfo, method: DioMethod.get);
  }

}
